package com.tianji.learning.service.impl;

import com.tianji.learning.config.PointsConfig;
import com.tianji.learning.enums.PointsRecordType;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class PointsService {
    private final PointsConfig pointsConfig;

    public int getMaxPoints(PointsRecordType type) {
        return pointsConfig.getMaxPoints().getOrDefault(type.name(), 0);
    }
}